﻿/*------------------------------------------------
// File Description: FtpConfig DataBase Entity
// Author:			 Crane
// Create Time:		 2021-05-11 14:49:11
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// FTP配置
    /// </summary>
    [Table(nameof(FtpConfig))]
    public class FtpConfig : BaseEntity
    {
        private string _workshopCode = string.Empty;
        private string _workshopName = string.Empty;
        private string _ftpRoot = string.Empty;
        private string _userName = string.Empty;
        private string _password = string.Empty;

        #region Public Property

        ///<Summary>
        /// 车间代码
        ///</Summary>
        public string WorkshopCode
        {
            get { return string.IsNullOrWhiteSpace(_workshopCode) ? string.Empty : _workshopCode; }
            set { _workshopCode = value; }
        }

        ///<Summary>
        /// 车间名称
        ///</Summary>
        public string WorkshopName
        {
            get { return string.IsNullOrWhiteSpace(_workshopName) ? string.Empty : _workshopName; }
            set { _workshopName = value; }
        }

        ///<Summary>
        /// FTP根地址
        ///</Summary>
        public string FtpRoot
        {
            get { return string.IsNullOrWhiteSpace(_ftpRoot) ? string.Empty : _ftpRoot; }
            set { _ftpRoot = value; }
        }

        ///<Summary>
        /// FTP账号
        ///</Summary>
        public string UserName
        {
            get { return string.IsNullOrWhiteSpace(_userName) ? string.Empty : _userName; }
            set { _userName = value; }
        }

        ///<Summary>
        /// FTP密码
        ///</Summary>
        public string Password
        {
            get { return string.IsNullOrWhiteSpace(_password) ? string.Empty : _password; }
            set { _password = value; }
        }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 
        /// </summary>
        public virtual DbSet<FtpConfig> FtpConfigs { get; set; }
    }
}